import {ref, computed} from 'vue'
import {defineStore} from 'pinia'
import {userLoginService} from "@/api/user.js";

export const useCounterStore = defineStore('counter', () => {
    const count = ref(0)
    const doubleCount = computed(() => count.value * 2)

    function increment() {
        const res = userLoginService('bantang', '123456')
        console.log(res)
    }

    return {count, doubleCount, increment}
}, {
    // 持久化
    persist: true,
},)
